import __builtin__
from client.gamestates.stateabstract import StateAbstract


class StateCreateGame(StateAbstract):
    def __init__(self):
        super(StateCreateGame, self).__init__("CreateGame")
        self.is_creator = False
        self.ses_id = None
        self.attacker = 0
        self.defender = 0

    def activate(self):
        __builtin__.base.guimanager.create_creategame()

    def deactivate(self):
        __builtin__.base.guimanager.destroy_current_gui()

    def update(self, dt):
        pass

    def reset_session(self):
        print "RESET"
        self.is_creator = False
        self.ses_id = None
        self.attacker = 0
        self.defender = 0
        __builtin__.base.gamestatemanager.getState("RunningSession").started = False